<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
body {margin:0; padding:0;}
#ul1 {width:400px; height:400px; border:1px solid black; margin:10px auto; overflow:hidden;}
#ul1 li {border-bottom:1px #999 dashed; padding:4px; list-style:none;overflow:hidden; opacity:0;}}
</style>
<script src="7-2-move2完美运动框架.js"></script>
<script>
window.onload=function()
{
	var oBtn=document.getElementById('btn1');
	var oUl=document.getElementById('ul1');
	var oTxt=document.getElementById('txt1');
	
	oBtn.onclick=function()
	{
		var oLi=document.createElement('li');
		
		oLi.innerHTML=oTxt.value;
		oTxt.value='';
		
		if(oUl.children.length>0)
		{
			oUl.insertBefore(oLi,oUl.children[0]);
		}
		else
		{
			oUl.appendChild(oLi);
		}
		//运动
		var iHeight=oLi.offsetHeight;
		
		oLi.style.height='0';
		startMove(oLi,{height:iHeight},function(){
			startMove(oLi,{opacity:100});
			});
	}
};
</script>

</head>

<body>
<textarea id="txt1" rows="4" cols="40"></textarea>
<input id="btn1" type="button" value="发布" />
<ul id="ul1">
	<li>kladj</li>
</ul>
</body>
</html>
